﻿<phone:PhoneApplicationPage 
    x:Class="NutriLeaf.Phone.Pages.Tips.Tips"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False" Loaded="PhoneApplicationPage_Loaded">

    <!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot">
        <controls:Panorama Title="tips and facts">

            <!--Panorama item one-->
            

            <!--Panorama item two-->
            <controls:PanoramaItem Header="categories">
                <Grid>

                    
                    <ListBox x:Name="TipCategoriesLB" Height="449" HorizontalAlignment="Left" Margin="5,49,0,0" VerticalAlignment="Top" Width="410" SelectionChanged="TipCategoriesLB_SelectionChanged">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="{Binding CategoryName}"/>
                                    <Button Name="SubscribeBtn" Content="{Binding Path=TipCategoryID}" Tap="Subscribe_Tap"/>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                    <TextBlock Height="30" HorizontalAlignment="Left" Margin="11,7,0,0" Name="SelectedCategoryLBL" Text="select a category" VerticalAlignment="Top" Width="399" Tap="SelectedCategoryLBL_Tap" />
                </Grid>
            </controls:PanoramaItem>

            <!--Panorama item three-->
            <controls:PanoramaItem Header="tips">
                <Grid >
                    <ListBox x:Name="TipsLB" Height="499" HorizontalAlignment="Left" Margin="5,-1,0,0" VerticalAlignment="Top" Width="410">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="{Binding TipText}"/>
                                    <Button Name="LikeBtn" Content="" Tap="Like_Tap"/>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                    
                </Grid>
            </controls:PanoramaItem>

        </controls:Panorama>
    </Grid>

    <!--Panorama-based applications should not show an ApplicationBar-->

</phone:PhoneApplicationPage>